<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
	<script>
		
		window.onload= function () {
			btn = document.getElementById('btn');
			logo = document.getElementById('logo');


			alert(logo.getAttribute('username'))
			logo.setAttribute('username','8888')

			// btn.value ="xxx"

			// alert(logo.username);
		}
	</script>
</head>
<body>
	<input type="button" id="btn" value="点我">
	<a href="https://www.baidu.com/img/bd_logo1.png?where=super" id="logo" username='xuebingsi' class="xuebingsi"></a>
</body>
</html>